package cn.js.sangu.unitStore.mapper;

import cn.js.sangu.unitStore.entity.FileNas;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface FileMapper extends BaseMapper<FileNas> {

    @Update("UPDATE file SET down_count = down_count+1 WHERE id = #{id}")
    int incrementDownCountById(@Param("id") Integer id);

    @Update("UPDATE file SET down_count = down_count+1 WHERE file_path = #{filePath}")
    int incrementDownCountByFilePath(@Param("filePath") String filePath);

}
